import request from "@/utils/request";


export const addApi = (data: any) => {
  return request({
    url: '/categories/add',
    method: 'POST',
    data: data,
  });
}

export const selectListApi = (data: any) => {
  return request({
    url: '/categories/selectList',
    method: 'POST',
    data: data,
  });
}

export const deleteApi = (id: number) => {
  return request({
    url: '/categories/delete',
    method: 'POST',
    data: {
      id
    },
  });
}
export const updateApi = (data: any) => {
  return request({
    url: '/categories/update',
    method: 'POST',
    data: data,
  });
}